﻿using System;

namespace MindlessBot
{
    class Program
    {
        static void Main(string[] args)
        {
            int radius = int.Parse(Console.ReadLine());
            string[] botTokens = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            double botPositionX = double.Parse(botTokens[0]);
            double botPositionY = double.Parse(botTokens[1]);
            int botCoolDown = int.Parse(botTokens[2]);

            string[] frogTokens = Console.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            double frogPositionX = double.Parse(frogTokens[0]);
            double frogPositionY = double.Parse(frogTokens[1]);
            int frogCoolDown = int.Parse(frogTokens[2]);
            int lines = int.Parse(Console.ReadLine());
            for (int i = 0; i < lines; i++)
            {
                Console.ReadLine();
            }

            Console.WriteLine("move {0} {1}", frogPositionX, frogPositionY);

            if (botCoolDown == 0)
            {
                Console.WriteLine("shoot {0} {1}", frogPositionX, frogPositionY);
            }
        }
    }
}
